package com.pro.service.imple;

import com.pro.dao.CourseRankingMapper;
import com.pro.entity.CourseRanking;
import com.pro.service.CourseRankingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: CourseRankingServiceImple
 * @Author: 笑笑
 * @DATE: 2021/11/24
 * @TIME: 下午 04:01
 */
@Service
public class CourseRankingServiceImple implements CourseRankingService {
    @Autowired
    private CourseRankingMapper courseRankingMapper;

    //查询统计课程
    @Override
    public List<CourseRanking> getCountCourse(CourseRanking courseRanking) throws Exception {
        if (courseRanking.getField() == null || "".equals(courseRanking.getField())){
            throw new Exception("字段不能为空");
        }
        return courseRankingMapper.getCountCourse(courseRanking);
    }
}
